<!doctype html>
<html>
<head>
    <!-- name="referrer" content="never" -->
<meta charset="utf-8">
<title>无标题文档</title>

<style type="text/css">
  
#whole{
    padding: 30px 200px 0 30px;
    position: relative;
}

#entry {
    height: 1024px;
    padding: 50px 30px;
    position: relative;
}


#masonry {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.entry ul {
    list-style: none;
   /*list-style-type: none;*/
    list-style-type: none;
    padding-right: 40px;
}

.slider {
    font-size: 16px;
}

.slider .block {
    height: 100%;
    display: block;
    margin-bottom: 20px;
    margin-right: 40px;
    font-size: 16px;
}

.slider .block div {
    position: relative;
}


.slider .block div a {

    color: #000000;

}
/*blogger-头相框部分*/

.blogger {
    width: 210px !important;
    height: 210px !important;
    
    float: left;
}

/*头像*/
.blogger .pos-img{
    padding-left: 32%;
    padding-top: 21%;
     width:auto;
     height:auto;
     max-width:100%;
     max-height:100%;
}

.blogger .pos-img img{
    border-radius: 50%;
}

/*展示作者图片区域*/
.blogger1 {
    width: 790px !important;
    height: 210px !important;
    padding-top: 26px;
    margin-left: 210px;
}
/*作品展示文字样式*/
.illust-title{
    font-size: 30px;
    line-height: 28px;
    color: rgba(0,0,0,.64);
    font-weight: 700;
    margin: 0 0 12px;
    padding-left: 12px;
    text-align: center;
}

/*图片内容的排版*/

.illust-content{
    display: flex;
   /* padding: 0;*/
    flex-wrap: wrap;
    margin: -12px;
    list-style: none;
}

.pix-card{
    margin: 12px;
   /* width: 164px;*/
    order: 1;
}

.illust{
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    width: 165px;
    height: 195px;
    text-align: center;
}

.el-image {
    position: relative;
    display: inline-block;
    overflow: hidden;
    width: 165px;
    height: 165px;
}

.el-image__inner {
    vertical-align: top;
    width: 80%;
    height: 80%;
}

img {
    border-style: none;
}

    
</style>
</head>

<body>
  <div style="float: right;margin-right: 15%;margin-top: 36px;z-index: 99;position: absolute;margin-left: 180px;">
        <input name="but" type=submit id="but" onClick="javascript:window.location.href=document.referrer;" value="返回上一页">
    </div>
<?php
   
    //用oss存储
     $id=  isset($_GET['id'])? $_GET['id'] : "";
    
     $conn=@mysql_connect("localhost","root","")  or die(mysql_error());
     mysql_query("SET NAMES UTF8");
     @mysql_select_db('guyueyan',$conn) or die(mysql_error());
    
    //查询登录用户上传的图片  这里的id是用户id
    $sqlstr = "select * from pictures where user_id='$id'";
    $query = mysql_query($sqlstr) or die(mysql_error());
 ?>    
    


<article id="whole">
    <div id="entry">
    <ul id="masonry" class="slider"> 
        
        <li class="block">
        <div style="background-color: antiquewhite;height: 97%;">
             <div class="blogger1">
                <h2 class="illust-title">我的作品</h2>
                
               
  <form action="photo_bianji_xiugai.php" method="post"> 
      
    <?php
    $count = 0;   //记录图片数，控制行数；
        while($thread=mysql_fetch_row($query)){
            if($count%3==0)
                echo " <ul class='illust-content'>";
            $count++;
            $id = $thread[0]; //此时的是图片id
            $houzui = explode("/",$thread[3])[1];
            $name = $thread[1];     //图片的名字，alt
            $url = $thread[5];
           
            echo "<li class='pix-card'>";
            echo "<div class='illust'> ";
            
             echo "<a href='mian_pgoto_xianshi.php?id=$id' target='_blank' style='padding: 0px;'>";
            echo " <div class='el-image'>";
            echo "<img src='$url?x-oss-process=image/resize,m_fill,w_450'  alt='$name' width='32' height='32' class='el-image__inner'/> ";
            /*echo " <div style='height: 25px;position: relative;z-index:999;width: 75px;margin-left: 45px;'></div>";*/
            echo "</div> </a>";
            
            echo "<div style='position: absolute;margin-top: -25px;margin-left: 35px;''>";//标记01
            echo "<div><input name='name[]' type='text' value='$name' style='width: 75px;text-align: center;'></div>";
            
            echo "<div style='margin-top: 7px;'>";
            echo "<input name='xiu$count' type='submit' id='ann' value='修改'>";
            echo "<input name='ids[]' type='hidden' value=$id>";//隐藏域,传送图片的id
            echo "<input style='margin-left: 25px;' name='shan$count' type='submit' id='ann' value='删除'>";
            echo "</div></div>";//标记01
            
            
            echo "</div>";
            
            echo "</li>";
            
            if($count%3==0)
                echo "</ul>";
    }
          
   
    ?>             
                 </form>  
            </div>
        </div>
        </li>
    </ul>
    </div>
    </article>


  
   
</body>
</html>